<?php
class controller extends base{
	private $api;

	public function __construct(xiaonei_api $api){
		parent::__construct();
		$this->api = $api;
	}


	public function run(){
		$result = $this->api->users('getLoggedInUser');
		//var_dump($result);
		echo '欢迎'.$result['uid'].'来到hoho!';
		$url = $this->app_url.'index.php?m=index';
		echo  "<a href='$url'>首页</a>";
	}
}